package com.ddwl.gate.dao;

import com.ddwl.common.dao.TkDao;
import com.ddwl.common.util.MySqlUtil;
import com.ddwl.gate.mapper.SupportMapper;
import com.ddwl.gate.model.Support;
import com.ddwl.schema.bo.gate.SupportBo;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @Author wenbin
 */
@Repository
public class SupportDao extends TkDao<SupportMapper, Support> {

    public List<Support> getList(SupportBo param) {
        Example example = getExample();
        example.and().andLike("title", MySqlUtil.allLike(param.getTitle()))
        .andEqualTo("supportType",param.getSupportType())
        .andEqualTo("effect",param.getEffect());
        return baseMapper.selectByExample(example);
    }

}
